package com.czl.websocket.util;

import cn.hutool.core.convert.Convert;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class FruitName {

    private static final   List<String> list= new ArrayList();

    static{
        String strs="草莓,蓝莓,黑莓,桑葚,覆盆子,葡萄,青提,红提,水晶葡萄,马奶子,蜜橘,砂糖橘,金橘,蜜柑,甜橙,脐橙,西柚,柚子,葡萄柚,柠檬,文旦,莱姆核,桃,油桃,蟠桃,水蜜桃,黄桃,李子,樱桃,杏,梅子,杨梅,西梅,乌梅,大枣,沙枣,海枣,蜜枣,橄榄,荔枝,龙眼,桂圆,苹果,梨,黄金梨,香梨,雪梨,香蕉梨,蛇果,海棠果,沙果,柿子,山竹,黑布林,枇杷,杨桃,山楂,圣女果,无花果,白果,罗汉果,火龙果,猕猴桃,西瓜,美人瓜,甜瓜,香瓜,黄河蜜,哈密瓜,木瓜,乳瓜,菠萝,芒果,栗子,椰子,奇异果,芭乐,榴莲,香蕉,甘蔗,百合,莲子,石榴,核桃 ";
        String[] split = strs.split(",");
        Arrays.stream(split).forEach(e->list.add(e));
    }

    public static String randomName(String uid) {
        Long l = Convert.toLong(uid);
        int temp=Convert.toInt(l%list.size());
        return list.get(temp);
    }


    public static void main(String[] args) {
        for (int i = 0; i < 100; i++) {
            String s = randomName(i + "");
            System.out.println(s);
        }
    }


}
